package ru.braim.weather_app.models.enums;

import lombok.Getter;

@Getter
public enum WeatherCondition {

    CLEAR("CLEAR"),
    CLOUDY("CLOUDY"),
    RAIN("RAIN"),
    SNOW("SNOW"),
    SUNNY("SUNNY"),
    STORM("STORM");

    private final String weatherCondition;

    WeatherCondition(String weatherCondition) {
        this.weatherCondition = weatherCondition;
    }

    public static WeatherCondition getWeatherCondition(String weatherCondition) {
        for (WeatherCondition condition : WeatherCondition.values()) {
            if (condition.getWeatherCondition().equals(weatherCondition)) {
                return condition;
            }
        }
        return null;
    }
}
